Part Number Hot Search : 
DS3102GN 2SK3408 OM184SC LT1134 FDMS86 18R333 AD586KN AN79L05
Product Description
Full Text Search
 

To Download HT95A20020P Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ht95axxx i/o type phone 8-bit mcu rev. 1.20 1 may 26, 2004 features  provide mask type and otp type version  operating voltage range: 2.4v~5.5v  program rom  ht95a400/40p: 16k  16 bits  ht95a300/30p: 8k  16 bits  ht95a200/20p: 4k  16 bits  ht95a100/10p: 4k  16 bits  data ram  ht95a400/40p: 2880  8 bits  ht95a300/30p: 2112  8 bits  ht95a200/20p: 1152  8 bits  ht95a100/10p: 384  8 bits  bidirectional i/o lines  ht95a400/40p: 44 i/o lines  ht95a300/30p: 28 i/o lines  ht95a200/20p: 28 i/o lines  ht95a100/10p: 20 i/o lines  16-bit table read instructions  subroutine nesting  ht95a400/40p: 12 levels  ht95a300/30p: 8 levels  ht95a200/20p: 8 levels  ht95a100/10p: 4 levels  timer  two 16-bit programmable timer/event counter  real time clock (rtc)  watchdog timer (wdt)  programmable frequency divider (pfd) supported for ht95a400/40p, ht95a300/30p, ht95a200/20p  dual system clock: 32768hz, 3.58mhz  four operating modes: idle mode, sleep mode, green mode and normal mode  up to 1.117  s instruction cycle with 3.58mhz system clock  all instructions in one or two machine cycles  built-in 3.58mhz dtmf generator  built-in dialer i/o  ht95a400/40p: 64-pin qfp package ht95a300/40p: 48-pin ssop package ht95a200/20p: 48-pin ssop package ht95a100/10p: 28-pin sop package applications  cordless phone  fax and answering machines  other communication system general description the ht95axxx family mcu are 8-bit high performance risc-like microcontrollers with built-in dtmf generator and dialer i/o which provide mcu dialer implementation or system control features for telecom product applica - tions. the phone controller has a built-in program rom, data ram and i/o lines for high end products design. in addition, for power management purpose, it has a built-in frequency up conversion circuit (32768hz to 3.58mhz) which provides dual system clock and four types of operation modes. for example, it can operate with low speed system clock rate of 32768hz in green mode with little power consumption. it can also operate with high speed system clock rate of 3.58mhz in normal mode for high performance operation. to ensure smooth dialer function and to avoid mcu shut-down in extreme low voltage situation, the dialer i/o circuit is built-in to generate hardware dialer signals such as on-hook, hold-line and hand-free. built-in real time clock and programmable frequency divider are provided for additional fancy features in product developments. the device is best suited for phone products that comply with versatile dialer specification requirements of differ - ent areas or countries.
selection table part no. operating voltage program memory data memory normal i/o dialer i/o lcd timer stack external interrupt dtmf generator fsk receiver package ht95a100 ht95a10p 2.4v~5.5v 4k  16 384  8 20 6  16-bit  2 43  28sop ht95a200 ht95a20p 2.4v~5.5v 4k  16 1152  8 28 8  16-bit  2 84  48ssop ht95a300 ht95a30p 2.4v~5.5v 8k  16 2112  8 28 8  16-bit  2 84  48ssop ht95a400 ht95a40p 2.4v~5.5v 16k  16 2880  8 44 8  16-bit  2 12 4  64qfp ht95l000 ht95l00p 2.4v~5.5v 4k  16 384  8 14~18 6 12  8~16  8 16-bit  2 43  56ssop ht95l100 ht95l10p 2.4v~5.5v 4k  16 1152  8 16~20 8 16  8~20  8 16-bit  2 84  64qfp ht95l200 ht95l20p 2.4v~5.5v 8k  16 1152  8 20~28 8 24  8~24  16 16-bit  2 84  100qfp ht95l300 ht95l30p 2.4v~5.5v 8k  16 2112  8 16~28 8 36  16~48  16 16-bit  2 84  100qfp ht95l400 ht95l40p 2.4v~5.5v 16k  16 2880  8 28~40 8 36  16~48  16 16-bit  2 12 4  128qfp ht95c200 ht95c20p 2.4v~5.5v 8k  16 1152  8 20~28 8 24  8~24  16 16-bit  2 84  128qfp ht95c300 ht95c30p 2.4v~5.5v 8k  16 2112  8 16~28 8 36  16~48  16 16-bit  2 84  128qfp ht95c400 ht95c40p 2.4v~5.5v 16k  16 2880  8 28~40 8 36  16~48  16 16-bit  2 12 4  128qfp note: part numbers suffixed with  p  are otp devices, all others are mask version devices. block diagram (ht95a400/40p) ht95axxx rev. 1.20 2 may 26, 2004               

    
          
              
   
          
                             
 !   "  #                 $                  %       
&  ' 
&       
' (      '               ) % * + , - .    '          /    /   '     0  ) % * + , - .     '  0
 1 2 3 /   '                ) % * + , - .                 '  0
 1 2 3 '       4             5   *       6     %   ) % * + , - .
' ) 7 8 ,  - . 2 3 
&      0 9   9     0  '  2  - 4  - 4  -   -   -             6    4     
   4 ) 7 8 ,  - .     :  :   :  5  : *         5   *  6  6   6  5  6 *  4  4   4  5  4 *         5   )
pin assignment note: the following pads for the ht95a100/10p are not bonded to the package. pd2, pd3, hks ,po , hfi, hfo pin description pin name i/o description cpu vdd  positive power supply vss  negative power supply, ground x1 i a 32768hz crystal (or resonator) should be connected to this pin and x2. x2 o a 32768hz crystal (or resonator) should be connected to this pin and x1. xc i external low pass filter used for frequency up conversion circuit. res i schmitt trigger reset input, active low. int i supported for ht95a400/40p, ht95a300/30p, ht95a200/20p schmitt trigger input for external interrupt. no internal pull-high resistor. edge trigger activated on a falling edge. tmr0 i supported for ht95a400/40p, ht95a300/30p, ht95a200/20p schmitt trigger input for timer/event counter 0. no internal pull-high resistor. activated on falling or rising transition edge, selected by software. activated on a falling or rising transition edge, selected by software. int /tmr0 i supported for ht95a100/10p schmitt trigger input for external interrupt or timer/event counter 0. no internal pull-high resistor. for int : edge trigger activated on a falling edge. for tmr0: activated on a falling or rising transition edge, selected by software. ht95axxx rev. 1.20 3 may 26, 2004 3 , 3 * 3 + 3 8 3 3 3 ) 3 % 3  3  ) $ ) , ) * ) + ) 8 ) 3 ) ) ) % )  )  % $ % , % * % + % 8  % ) 3 8 + * , $      %  )  3  8  +  *  ,  $ %  %  % % % ) % 3   )   %        : *  : +  : 8  : 3 9    : )  : %  :   :    *   +   8   3   )   %                    3   8   +   *  %       9    6     4 - 4  - 4  -   -       6       -    6 )  6 %  6   6                  
  
      % , % * % + % 8 % 3 % ) % % %  %   $  ,  *  +  8  % ) 3 8 + * , $      %  )  3           
      )   %        : *  : +  : 8  : 3  : )  : %  :   :  9         3   8   +   *    4        %     9    6     2         6  % ) 3 8 + * , $      %  )  3  8  +  *  ,  $ % + % * % , % $ )  )  ) % + 3 + ) + % +  +  8 $ 8 , 8 * 8 + 8 8 8 3 8 ) 8 % %  %  % % % ) % 3 % 8 8  8  3 $ 3 , 3 * 3 + 3 8 3 3 3 ) 3 % 3  3  ) $ ) , ) * ) + ) 8 ) 3 ) )                    *   +   8   3   )   %        : *  : +  : 8  : 3  : )  : %  :   :      6            %      9   9   - 4  - 4  -   -   -      6   6 %  6 )  6 3  6 8  6 +  6 *         %   )   3   8   +   *       6         4  6   4 *  4 +  4 8  4 3  4 )  4 %  4   4      )   %    ;
pin name i/o description tmr1 i supported for ht95a400/40p, ht95a300/30p, ht95a200/20p schmitt trigger input for timer/event counter 1. no internal pull-high resistor. activated on falling or rising transition edge, selected by software. normal i/o pa7~pa0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high and wake-up function. pb7~pb0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high function pd7~pd0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high function pe7~pe0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high function pf7~pf0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high function pg3~pg0 i/o bidirectional input/output ports. schmitt trigger input and cmos output. see mask option table for pull-high function dialer i/o (see the  dialer i/o function  ) hfi i schmitt trigger input structure. an external rc network is recommended for input debouncing. this pin is pulled low with internal resistance of 200k  typ. hfo o cmos output structure. hdi i schmitt trigger input structure. an external rc network is recommended for input debouncing. this pin is pulled high with internal resistance of 200k  typ. hdo o cmos output structure. hks i this pin detects the status of the hook-switch and its combination with hfi/hdi can con- trol the po pin output to make or break the line. po o cmos output structure controlled by hks and hfi/hdi pins and which determines whether the dialer connects or disconnects the telephone line. dnpo o nmos output structure. xmute o nmos output structure. usually, xmute is used to mute the speech circuit when trans - mitting the dialer signal. peripherals dtmf o this pin outputs dual tone signals to dial out the phone number. the load resistor should not be less than 5k  . music o this pin outputs the single tone that is generated by the pfd generator. absolute maximum ratings supply voltage ..........................v ss  0.3v to v ss +5.5v storage temperature ...........................  50  cto125  c input voltage .............................. v ss  0.3 to v dd +0.3v operating temperature ..........................  20  cto70  c note: these are stress ratings only. stresses exceeding the range specified under  absolute maximum ratings  may cause substantial damage to the device. functional operation of this device at other conditions beyond those listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliabil - ity. ht95axxx rev. 1.20 4 may 26, 2004
electrical characteristics ta=25 c symbol parameter test conditions min. typ. max. unit v dd conditions cpu i idl idle mode current 5v 32768hz off, 3.58mhz off, cpu off, wdt off, no load  2  a i slp sleep mode current 5v 32768hz on, 3.58mhz off, cpu off, wdt off, no load  30  a i grn green mode current 5v 32768hz on, 3.58mhz off, cpu on, wdt off, no load  50  a i nor normal mode current 5v 32768hz on, 3.58mhz on, cpu on, wdt on, dtmf generator off, no load  3ma v il i/o port input low voltage 5v  0  1v v ih i/o port input high voltage 5v  4  5v i ol i/o port sink current 5v  46  ma i oh i/o port source current 5v  2  3  ma r ph pull-high resistor 5v  10 30  k  dialer i/o i xmo xmute leakage current 2.5v xmute pin=2.5v  1  a i olxm xmute sink current 2.5v xmute pin=0.5v 1  ma i hks hks input current 2.5v hks pin=2.5v  0.1  a r hfi hfi pull-low resistance 2.5v v hfi =2.5v  200  k  r hdi hdi pull-high resistance 2.5v v hdi =0v  200  k  i oh2 hfo source current 2.5v v oh =2v  1  ma i ol2 hfo sink current 2.5v v ol =0.5v 1  ma i oh3 hdo source current 2.5v v oh =2v  1  ma i ol3 hdo sink current 2.5v v ol =0.5v 1  ma i oh4 po source current 2.5v v oh =2v  1  ma i ol4 po sink current 2.5v v ol =0.5v 1  ma i ol5 dnpo sink current 2.5v v ol =0.5v 1  ma dtmf generator v tdc dtmf output dc level  0.45v dd  0.7v dd v v tol dtmf sink current  v dtmf =0.5v 0.1  ma v tac dtmf output ac level  row group, r l =5k  120 155 180 mvrms r l dtmf output load  thd
 23db 5  k  a cr column pre-emphasis  row group=0db 1 2 3 db thd tone signal distortion  r l =5k  30  23 db ht95axxx rev. 1.20 5 may 26, 2004
ht95axxx rev. 1.20 6 may 26, 2004    %  )  3    %  )  3    %  )  3 4    " '     ' <   = 6 >      '     ' <   ?  = 4    " '     ' <   @  = 6 >      '     ' <   = 4    " '     ' <   @ % = 6 >      '     ' <   @  =     @    @ %     '  0
 1   execution flow mode program counter *13 *12 *11 *10 *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 initial reset 00000000000000 external interrupt 00000000000100 timer/event counter 0 overflow 00000000001000 timer/event counter 1 overflow 00000000001100 rtc interrupt 00000000010100 dialer i/o interrupt 00000000011000 skip program counter+2 (within current bank) loading pcl *13 *12 *11 *10 *9 *8 @7 @6 @5 @4 @3 @2 @1 @0 jump, call branch bp.5 #12 #11 #10 #9 #8 #7 #6 #5 #4 #3 #2 #1 #0 return from subroutine s13 s12 s11 s10 s9 s8 s7 s6 s5 s4 s3 s2 s1 s0 program rom address note: *13~*0: program counter bits s13~s0: stack register bits #12~#0: instruction code bits @7~@0: pcl bits available bits of program counter for ht95a400/40p: bit13~bit0 available bits of program counter for ht95a300/30p: bit12~bit0 available bits of program counter for ht95a200/20p: bit11~bit0 available bits of program counter for ht95a100/10p: bit11~bit0 functional description execution flow the system clock for the telephone controller is derived from a 32768hz crystal oscillator. a built-in frequency up conversion circuit provides dual system clock, namely; 32768hz and 3.58mhz. the system clock is internally divided into four non-overlapping clocks. one instruc - tion cycle consists of four system clock cycles. instruc - tion fetching and execution are pipelined in such a way that a fetch takes an instruction cycle while decoding and execution takes the next instruction cycle. the pipelining scheme causes each instruction to be effec - tively executed in a instruction cycle. if an instruction changes the program counter, two instruction cycles are required to complete the instruction. program counter  pc the program counter (pc) controls the sequence in which the instructions stored in the program rom are executed and its contents specify a full range of pro - gram memory. after accessing a program memory word to fetch an instruction code, the contents of the program counter are incremented by 1. the program counter then points to the memory word containing the next in - struction code. when executing a jump instruction, conditional skip ex - ecution, loading pcl register, subroutine call, initial re - set, internal interrupt, external interrupt or return from subroutine, the program counter manipulates the pro - gram transfer by loading the address corresponding to each instruction. the conditional skip is activated by in - structions. once the condition is met, the next instruc - tion, fetched during the current instruction execution, is discarded and a dummy cycle replaces it to get the proper instruction. otherwise proceed to the next in - struction. the program counter lower order byte register (pcl:06h) is a readable and write-able register. moving data into the pcl performs a short jump. the destina - tion will be within 256 locations. when a control transfer takes place, an additional dummy cycle is required.
ht95axxx rev. 1.20 7 may 26, 2004 program memory  rom the program memory is used to store the program in - structions which are to be executed. it also contains data, table, and interrupt entries, and is organized into 8k  16 bits  2 banks (ht95a400/40p), 8k  16 bits (ht95a300/30p) or 4k  16 bits (ht95a200/20p, ht95a100/10p), addressed by the program counter and table pointer. for the ht95a400/40p, the program memory is divided into 2 banks, each bank having a rom size 8kx16its. to move from the present rom bank to a different rom bank, the higher 1 bits of the rom address are set by the bp (bank pointer), while the remaining 13 bits of the pc are set in the usual way by executing the appropriate jump or call instruction. as the 14 address bits are latched during the execution of a call or jump instruction, the correct value of the bp must first be setup before a jump or call is executed. when either a software or hard - ware interrupt is received, note that no matter which rom bank the program is in, the program will always jump to the appropriate interrupt service address in bank 0. the original 14 bits address will be stored on the stack and restored when the relevant ret/reti instruc - tion is executed, automatically returning the program to the original rom bank. this eliminates the need for pro - grammers to manage the bp when interrupts occur. certain locations in the program memory are reserved for special usage:  location 0000h (bank0) this area is reserved for the initialization program. af- ter chip power-on reset or external reset or wdt time-out reset, the program always begins execution at location 0000h.  location 0004h (bank0) this area is reserved for the external interrupt service program. if the int input pin is activated, the external interrupt is enabled and the stack is not full, the pro - gram begins execution at location 0004h.  location 0008h (bank0) this area is reserved for the timer/event counter 0 interrupt service program. if a timer interrupt results from a timer/event counter 0 overflow, the timer/event counter 0 interrupt is enabled and the stack is not full, the program begins execution at loca - tion 0008h.  location 000ch (bank0) this location is reserved for the timer/event counter 1 interrupt service program. if a timer interrupt results from a timer/event counter 1 overflow, the timer/event counter 1 interrupt is enabled and the stack is not full, the program begins execution at loca - tion 000ch.  location 0014h (bank0) this location is reserved for real time clock (rtc) in - terrupt service program. when rtc generator is en - abled and time-out occurs, the rtc interrupt is enabled and the stack is not full, the program begins execution at location 0014h.  location 0018h (bank0) this location is reserved for the hks pin edge transi - tion or hdi pin falling edge transition or hfi pin rising edge transition. if this condition occurs, the dialer i/o interrupt is enabled and the stack is not full, the pro - gram begins execution at location 18h. table location any location in the rom space can be used as look-up tables. the instructions  tabrdc [m]  (the current page, one page=256 words) and  tabrdl [m]  (the last page) transfer the contents of the lower-order byte to the specified data memory, and the higher-order byte to tblh (08h). for the ht95a400/40p, the instruction  tabrdc [m]  is used for any page of any bank. only the destination of the lower-order byte in the table is well-defined, and the higher-order byte of the table word is transferred to tblh. the table pointer (tblp) or (tbhp, tblp for the ht95a400/40p) is a read/write register (07h) or (1fh, 07h for the ht95a400/40p), which indicates the table location. before accessing the table, the location must be placed in the (tblp) or (tbhp, tblp for the ht95a400/40p). the tblh is read only and cannot be restored. if the main routine and the    -   3 -   , -   a    '      0  .  
 ' 
6 >    0 '        '   b
        2 6 a    ' 
    '  '        '   b
     
    + ' b    !

1 ?   '  b 0  ' < % 8 + ' /
  =    - !

1 ?   '  b 0  ' < % 8 + ' /
  = < !   '    = 
  c '  "  ' !   '   ' #
' -  $ 8  3   2 3   '   ' ) 4   - ' 5 ' ) 4 4 4 - ' ' ' ' ' ' ' '  "  ' !   '   ' #
' -  $ 8  )   2 )   '   '  4   - ' 5 '  4 4 4 - ' ' ' ' ' ' ' '  "  ' !   '   ' #
' -  $ 8  %   2 %   '   '  4   - ' 5 '  4 4 4 - ' ' ' ' ' ' ' '  "  ' !   '   ' #
' -  $ 8     2    '   '  4   - ' 5 '  4 4 4 -  4 4 -    2 6 a    ' 
    '  '        '   b
        -    -    '        '   b
       3 -   0  '  2  '        '   b
       , -     a   program memory
ht95axxx rev. 1.20 8 may 26, 2004 isr (interrupt service routine) both employ the table read instruction, the contents of the tblh in the main routine are likely to be changed by the table read in- struction used in the isr. errors will then occur. hence, simultaneously using the table read instruction in the main routine and the isr should be avoided. however, if the table read instruction has to be applied in both the main routine and the isr, the interrupt should be dis- abled prior to the table read instruction. it will not be en- abled until the tblh has been backed-up. all table related instructions require two cycles to complete the operation. these areas may function as normal pro - gram memory depending on the requirements. stack register this is a special part of the memory which is used to save the contents of the program counter only. the stack is organized into 12 levels (ht95a400/40p), 8 lev - els (ht95a300/30p, ht95a200/20p) or 4 levels (ht95a100/10p) and is neither part of the data nor part of the program space, and is neither readable nor writable . the activated level is indexed by the stack pointer (sp) and is neither readable nor writable .ata subroutine call or interrupt acknowledge signal, the con - tents of the program counter are pushed onto the stack. at the end of a subroutine or an interrupt routine, sig - naled by a return instruction (ret or reti), the program counter is restored to its previous value from the stack. after a chip reset, the sp will point to the top of the stack. if the stack is full and an interrupt takes place, the inter - rupt request flag will be recorded but the acknowledge signal will be inhibited even if this interrupt is enabled. when the stack pointer is decremented (by ret or reti), the interrupt will be serviced. this feature pre - vents stack overflow allowing the programmer to use the structure more easily. if the stack is full and a  call  is subsequently executed, stack overflow occurs and the first entry will be lost (only the most recent 12, 8 or 4, de- pending on various mcu type, returned addresses are stored). data memory the data memory is divided into three functional groups: special function registers, embedded control register and general purpose memory. most are read/write, but some are read only. the special function registers are located from 00h to 1fh. the embedded control registers are located in the memory areas from 20h to 3fh. the remaining spaces which are not specified in the following table before the 40h are reserved for future expanded usage and read - ing these locations will get  00h  . the general purpose data memory is divided into 15 banks (ht95a400/40p), 11 banks (ht95a300/30p), 6 banks (ht95a200/20p) or 2 banks (ht95a100/10p). the banks in the ram are all addressed from 40h to 0ffh and they are selected by setting the value of the bank pointer (bp). all of the data memory areas can handle arithmetic, logic, increment, decrement and rotate operations di - rectly. except for some dedicated bits, each bit in the data memory can be set and reset by  set [m].i  and  clr [m].i  . they are also indirectly accessible through memory pointer registers (mp0 or mp1). the bank1~bank14 are only indirectly accessible through memory pointer 1 register (mp1). ht95a400/40p instruction(s) table location *13 *12 *11 *10 *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 tabrdc [m] #5 #4 #3 #2 #1 #0 @7 @6 @5 @4 @3 @2 @1 @0 tabrdl [m] 111111@7@6@5@4@3@2@1@0 ht95a300/30p instruction(s) table location *12 *11 *10 *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 tabrdc [m] p12 p11 p10 p9 p8 @7 @6 @5 @4 @3 @2 @1 @0 tabrdl [m] 11111@7@6@5@4@3@2@1@0 ht95a200/20p, ht95a100/10p instruction(s) table location *11 *10 *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 tabrdc [m] p11 p10 p9 p8 @7 @6 @5 @4 @3 @2 @1 @0 tabrdl [m] 1111@7@6@5@4@3@2@1@0 note: *13~*0: table location bits #7~#0: tbhp register bit7~bit0 @7~@0: tblp register bit7~bit0 p12~p8: current program counter bits
ht95axxx rev. 1.20 9 may 26, 2004 special register, embedded control register, lcd display memory and general purpose ram bp (ram bank) address function description supported for ht95axxx 400/p 300/p 200/p 100/p special function register 00h 00h iar0 indirect addressing register 0  00h 01h mp0 memory pointer register 0  00h 02h iar1 indirect addressing register 1  00h 03h mp1 memory pointer register 1  00h 04h bp bank pointer register  00h 05h acc accumulator  00h 06h pcl program counter lower-order byte register  00h 07h tblp table pointer  00h 08h tblh table higher-order byte register  00h 09h wdts watchdog timer option setting register  00h 0ah status status register  00h 0bh intc0 interrupt control register 0  00h 0ch tmr0h timer/event counter 0 high-order byte register  00h 0dh tmr0l timer/event counter 0 low-order byte register  00h 0eh tmr0c timer/event counter 0 control register  00h 0fh tmr1h timer/event counter 1 high-order byte register  00h 10h tmr1l timer/event counter 1 low-order byte register  00h 11h tmr1c timer/event counter 1 control register  00h 12h pa port a data register  00h 13h pac port a control register  00h 14h pb port b data register  00h 15h pbc port b control register  00h 16h dialerio dialer i/o register  00h 18h pd port d data register  00h 19h pdc port d control register  00h 1ah pe port e data register  00h 1bh pec port e control register  00h 1eh intc1 interrupt control register 1  00h 1fh tbhp table high-order byte pointer  
ht95axxx rev. 1.20 10 may 26, 2004 bp (ram bank) address function description supported for ht95axxx 400/p 300/p 200/p 100/p embedded control register 00h 20h dtmfc dtmf generator control register  00h 21h dtmfd dtmf generator data register  00h 22h line line control register  00h 24h rtcc real time clock control register  00h 26h mode operation mode control register  00h 2eh pfdc pfd control register  00h 2fh pfdd pfd data register  00h 34h pf port f data register   00h 35h pfc port f control register   00h 36h pg port g data register   00h 37h pgc port g control register   general purpose ram 00h 40h~ffh bank0 ram general purpose ram space  01h 40h~ffh bank1 ram general purpose ram space  02h 40h~ffh bank2 ram general purpose ram space  03h 40h~ffh bank3 ram general purpose ram space  04h 40h~ffh bank4 ram general purpose ram space  05h 40h~ffh bank5 ram general purpose ram space  06h 40h~ffh bank6 ram general purpose ram space  07h 40h~ffh bank7 ram general purpose ram space  08h 40h~ffh bank8 ram general purpose ram space  09h 40h~ffh bank9 ram general purpose ram space  0ah 40h~ffh bank10 ram general purpose ram space  0bh 40h~ffh bank11 ram general purpose ram space   0ch 40h~ffh bank12 ram general purpose ram space   0dh 40h~ffh bank13 ram general purpose ram space   0eh 40h~ffh bank14 ram general purpose ram space  
ht95axxx rev. 1.20 11 may 26, 2004 indirect addressing register location 00h and 02h are indirect addressing registers that are not physically implemented. any read/write op - eration of [00h] and [02h] will access the memory pointed to by mp0 and mp1, respectively. reading loca - tion [00h] or [02h] indirectly returns the result 00h, while writing it leads to no operation. mp0 is indirectly addressable in bank0, but mp1 is available for all banks by switch bp [04h]. if bp is unequal to 00h, the indirect addressing mode to read/write operation from 00h~3fh will return the result as same as the value of bank0. the memory pointer registers mp0 and mp1 are 8-bits registers, and the bank pointer register bp is 6-bits reg - ister for the ht95a400/40p or 5-bits for the other de - vices in the series. accumulator the accumulator is closely related to alu operations. it is also mapped to location 05h of the data memory and can operate with immediate data. all data movement between two data memory locations must pass through the accumulator. arithmetic and logic unit  alu this circuit performs 8-bit arithmetic and logic opera - tions and provides the following functions:  arithmetic operations (add, adc, sub, sbc, daa)  logic operations (and, or, xor, cpl)  rotation (rl, rr, rlc, rrc)  increment and decrement (inc, dec)  branch decision (sz, snz, siz, sdz, etc.) the alu not only saves the results of a data operation but also changes the status register. status register  status this status register contains the carry flag (c), auxiliary carry flag (ac), zero flag (z), overflow flag (ov), power down flag (pdf), and watchdog time-out flag (to). it also records the status information and controls the op - eration sequence. except for the to and pdf flags, bits in the status regis - ter can be altered by instructions, similar to the other registers. data written into the status register will not change the to or pdf flag. operations related to the status register may yield different results from those in - tended. the to flag can be affected only by system power-up, a wdt time-out or executing the  clr wdt  or  halt  instruction. the pdf flag can be affected only by executing the  halt  or  clr wdt  instruction or during a system power-up. the z, ov, ac and c flags generally reflect the status of the latest operations. on entering the interrupt sequence or executing the subroutine call, the status register will not be automati - cally pushed onto the stack. if the contents of the status are important and if the sub - routine can corrupt the status register, precautions must be taken to save it . interrupt the telephone controller provides an external interrupt, internal timer/event counter interrupt, an internal real time clock interrupt and internal dialer i/o interrupt. the interrupt control registers 0 and interrupt control reg- ister 1 both contains the interrupt control bits that set the enable/disable and the interrupt request flags once an interrupt subroutine is serviced, all the other in- terrupts will be blocked (by hardware clearing the emi bit). this scheme may prevent any further interrupt nest- ing. other interrupt requests may occur during this inter- val but only the interrupt request flag is recorded. if a certain interrupt requires servicing within the service routine, the emi bit and the corresponding bit of the intc0 (intc1) may be set to allow interrupt nesting. register label bits function status (0ah) c0 c is set if the operation results in a carry during an addition operation or if a borrow does not take place during a subtraction operation; otherwise c is cleared. also it is affected by a rotate through carry instruction. ac 1 ac is set if the operation results in a carry out of the low nibbles in addition or no bor - row from the high nibble into the low nibble in subtraction; otherwise ac is cleared. z 2 z is set if the result of an arithmetic or logic operation is 0; otherwise z is cleared. ov 3 ov is set if the operation results in a carry into the highest-order bit but not a carry out of the highest-order bit, or vice versa; otherwise ov is cleared. pdf 4 pdf is cleared when either a system power-up or executing the clr wdt instruc - tion. pdf is set by executing the halt instruction. to 5 to is cleared by a system power-up or executing the clr wdt or halt instruction. to is set by a wdt time-out.  6, 7 unused bit, read as  0 
ht95axxx rev. 1.20 12 may 26, 2004 if the stack is full, any other interrupt request will not be acknowledged, even if the related interrupt is enabled, until the stack pointer is decremented. if immediate ser - vice is desired, the stack must be prevented from be - coming full. all these kinds of interrupts have a wake-up capability. as an interrupt is serviced, a control transfer occurs by pushing the program counter onto the stack, followed by a branch to a subroutine at specified location in the pro - gram memory. only the program counter is pushed onto the stack. if the contents of the register or status register (status) are altered by the interrupt service program which corrupts the desired control sequence, the con - tents should be saved in advance. external interrupt is triggered by a high to low transition of the int pin (ht95a400/40p,ht95a300/30p, ht95a200/20p) or int /tmr0 (ht95a100/10p) and the interrupt request flag eif will be set. when the external interrupt is enabled, the stack is not full and the external interrupt is active, a subroutine call to location 04h will occur. the interrupt request flag eif and emi bits will be cleared to disable other interrupts. the timer/event counter 0 interrupt is generated by a timeout overflow and the interrupt request flag t0f will be set. when the timer/event counter 0 interrupt is en - abled, the stack is not full and the t0f bit is set, a sub- routine call to location 08h will occur. the interrupt request flag t0f and emi bits will be cleared to disable further interrupts. the timer/event counter 1 interrupt is generated by a timeout overflow and the interrupt request flag t1f will be set. when the timer/event counter 1 interrupt is en- abled, the stack is not full and the t1f bit is set, a subrou tine call to location 0ch will occur. the interrupt request flag t1f and emi bits will be cleared to disable further interrupts. the real time clock interrupt is generated by a 1hz rtc generator. when the rtc time-out occurs, the interrupt request flag rtcf will be set. when the rtc interrupt is enabled, the stack is not full and the rtcf is set, a sub - routine call to location 14h will occur. the interrupt re - quest flag rtcf and emi bits will be cleared to disable other interrupts. the dialer i/o interrupt is triggered by any edge transi - tion onto hks pin or a falling edge transition onto hdi pin or a rising edge transition onto hfi pin, the interrupt request flag drf will be set. when the dialer i/o inter - rupt is enabled, the stack is not full and the drf is set, a subroutine call to location 18h will occur. the interrupt request flag drf and emi bits will be cleared to disable other interrupts. note: 1. if the dialer status is on-hook and hold-line, the falling edge transition onto hdi pin will not generate the dialer i/o interrupt. 2. the hdi input is supported for ht95a400/40p, ht95a300/30p and ht95a200/20p. 3. the dialer i/o interrupt will be disabled when the operation mode is in idle mode. during the execution of an interrupt subroutine, other in- terrupt acknowledge signals are held until the reti in- struction is executed or the emi bit and the related interrupt control bit are set to 1 (if the stack is not full). to return from the interrupt subroutine,  ret  or  reti  may be invoked. reti will set the emi bit to enable an interrupt service, but ret will not. register bits label r/w function intc0 (0bh) 0 emi rw controls the master (global) interrupt (1=enabled; 0=disabled) 1 eei rw controls the external interrupt (1=enabled; 0=disabled) 2 et0i rw controls the timer/event counter 0 interrupt (1=enabled; 0=disabled) 3 et1i rw controls the timer/event counter 1 interrupt (1=enabled; 0=disabled) 4 eif rw external interrupt request flag (1=active; 0=inactive) 5 t0f rw timer/event counter 0 request flag (1=active; 0=inactive) 6 t1f rw timer/event counter 1 request flag (1=active; 0=inactive) 7  ro unused bit, read as  0  intc1 (1eh) 0  rw reserved, inhibit using 1 ertci rw control the real time clock interrupt (1=enable; 0=disable) 2 edri rw control the dialer i/o interrupt (1=enable; 0=disable) 3  ro unused bit, read as  0  4  rw reserved, inhibit using 5 rtcf rw internal real time clock interrupt request flag (1=active; 0=inactive) 6 drf rw internal dialer i/o interrupt request flag (1=active: 0=inactive) 7  ro unused bit, read as  0 
ht95axxx rev. 1.20 13 may 26, 2004 interrupts, occurring in the interval between the rising edges of two consecutive t2 pulses, will be serviced on the latter of the two t2 pulses, if the corresponding inter - rupts are enabled. in the case of simultaneous requests the following table shows the priority that is applied. these can be masked by resetting the emi bit. interrupt source priority vector external interrupt 1 04h timer/event counter 0 interrupt 2 08h timer/event counter 1 interrupt 3 0ch real time clock interrupt 4 14h dialer i/o interrupt 5 18h priority of the interrupt emi, eei, et0i, et1i, ertci and edri are used to con - trol the enabling/disabling of interrupts. these bits pre - vent the requested interrupt from being serviced. once the interrupt request flags (eif, t0f, t1f, rtcf, drf) are set by hardware or software, they will remain in the intc0 or intc1 registers until the interrupts are ser - viced or cleared by a software instruction. it is recommended that a program should not use the  call subroutine  within the interrupt subroutine. inter - rupts often occur in an unpredictable manner or need to be serviced immediately in some applications. if only one stack is left and enabling the interrupt is not well controlled, the original control sequence will be dam- aged once the  call  operates in the interrupt subrou- tine. oscillator configuration there are two oscillator circuits in the controller, the ex- ternal 32768hz crystal oscillator and internal wdt osc. the 32768hz crystal oscillator and frequency-up con - version circuit (32768hz to 3.58mhz) are designed for dual system clock source. it is necessary for frequency conversion circuit to add external rc components to make up the low pass filter that stabilize the output fre - quency 3.58mhz (see the oscillator circuit). the wdt osc is a free running on-chip rc oscillator, and no external components are required. even if the system enters the idle mode (the system clock is stopped), the wdt osc still works within a period of 78  s normally. when the wdt is disabled or the wdt source is not this rc oscillator, the wdt osc will be disabled. watchdog timer  wdt the wdt clock source is implemented by a wdt osc or external 32768hz or an instruction clock (system clock divided by 4), determined by the mask option. this timer is designed to prevent a software malfunction or sequence from jumping to an unknown location with un - predictable results. the watchdog timer can be dis - abled by mask option. if the watchdog timer is disabled, all the executions related to the wdt result in no opera- tion. if the device operates in a noisy environment, using the on-chip wdt osc or 32768hz crystal oscillator is strongly recommended. when the wdt clock source is selected, it will be first di- vided by 512 (9-stage) to get the nominal time-out pe- riod. by invoking the wdt prescaler, longer time-out periods can be realized. writing data to ws2, ws1, ws0 can give different time-out periods.     '  0
 1 2 3 $ ? b   ' 
    /   '     0  * ? b   ' 
    , ? 
?  '    /   '    ?
  /   5 /  %   1    
   0    /   '    ) % * + , - . watchdog timer    %    8 1  )  4 8   4 system oscillator circuit register label bits r/w function wdts (09h) ws0 ws1 ws2 0 1 2 rw watchdog timer division ratio selection bits bit 2, 1, 0=000, division ratio=1:1 bit 2, 1, 0=001, division ratio=1:2 bit 2, 1, 0=010, division ratio=1:4 bit 2, 1, 0=011, division ratio=1:8 bit 2, 1, 0=100, division ratio=1:16 bit 2, 1, 0=101, division ratio=1:32 bit 2, 1, 0=110, division ratio=1:64 bit 2, 1, 0=111, division ratio=1:128  7~3 rw unused bit. these bits are read/write-able.
ht95axxx rev. 1.20 14 may 26, 2004 the wdt osc period is 78  s. this time-out period may vary with temperature, vdd and process variations. the wdt osc always works for any operation mode. if the instruction clock is selected as the wdt clock source, the wdt operates in the same manner except in the sleep mode or idle mode. in these two modes, the wdt stops counting and lose its protecting purpose. in this situation the logic can only be re-started by external logic. if the wdt clock source is the 32768hz, the wdt also operates in the same manner except in the idle mode. when in the idle mode, the 32768hz stops, the wdt stops counting and lose its protecting purpose. in this situation the logic can only be re-started by external logic. the high nibble and bit3 of the wdts are reserved for user defined flags, which can be used to indicate some specified status. the wdt time-out under normal mode or green mode will initialize  chip reset  and set the status bit  to  . but in the sleep mode or idle mode, the time-out will initial - ize a  warm reset  and only the program counter and stack pointer are reset to 0. to clear the wdt contents (including the wdt prescaler), three methods are adopted; external reset (a low level to res pin), soft- ware instruction and a  halt  instruction. the software instruction include  clr wdt  and the other set  clr wdt1  and  clr wdt2  . of these two types of instruction, only one can be active depending on the mask option  wdt instr  .ifthe  clr wdt  is se- lected (i.e. one clear instruction), any execution of the clr wdt instruction will clear the wdt. in the case that  clr wdt1  and  clr wdt2  are chosen (i.e. two clear instructions), these two instructions must be exe - cuted to clear the wdt; otherwise, the wdt may reset the chip as a result of time-out. controller operation mode holtek s telephone controllers support two system clock and four operation modes. the system clock could be 32768hz or 3.58mhz and operation mode could be nor - mal, green, sleep or idle mode. these are all selected by the software. the following conditions will force the operation mode to change to green mode:  any reset condition from any operation mode  any interrupt from sleep mode or idle mode  port a wake-up from sleep mode or idle mode how to change the operation mode  normal mode to green mode: clear mode1 to 0, then operation mode is changed to green mode but the upen status is not changed. however, upen can be cleared by software.  normal mode or green mode to sleep mode: step 1: clear mode0 to 0 step 2: clear mode1 to 0 step 3: clear upen to 0 step 4: execute halt instruction after step 4, operation mode is changed to sleep mode.  normal mode or green mode to idle mode: step 1: set mode0 to 1 step 2: clear mode1 to 0 step 3: clear upen to 0 step 4: execute halt instruction after step 4, operation mode is changed to idle mode. register label bits r/w function mode (26h)  4~0 ro unused bit, read as  0  upen 5 rw 1: enable frequency up conversion function to generate 3.58mhz 0: disable frequency up conversion function to generate 3.58mhz mode0 6 rw 1: disable 32768hz oscillator while the halt instruction is executed (idle mode) 0: enable 32768hz oscillator while the halt instruction is executed (sleep mode) mode1 7 rw 1: select 3.58mhz as cpu system clock 0: select 32768hz as cpu system clock operation mode description halt instruction mode1 mode0 upen operation mode 32768hz 3.58mhz system clock not execute 1 x 1 normal on on 3.58mhz not execute 0 x 0 green on off 32768hz be executed 0 0 0 sleep on off halt be executed 0 1 0 idle off off halt note:  x  means don t care
ht95axxx rev. 1.20 15 may 26, 2004  green mode to normal mode: step 1: set upen to 1 step 2: software delay 20ms step 3: set mode1 to 1 after step 3, operation mode is changed to normal mode.  sleep mode or idle mode to green mode: method 1: any reset condition occurred method 2: any interrupt is active method 3: port a wake-up note: the timer 0, timer 1, rtc and dialer i/o inter - rupt function will not work at the idle mode be - cause the 32768hz crystal is stopped. the reset conditions include power on reset, external re - set, wdt time-out reset. by examining the processor status flag, pdf and to, the program can distinguish between different  reset conditions  . refer to the reset function for detailed description. the port a wake-up and interrupt can be considered as a continuation of normal execution. each bit in port a can be independently selected to wake-up the device by mask option. awakening from port a stimulus, the pro - gram will resume execution of the next instruction. any valid interrupts from sleep mode or idle mode may cause two sequences. one is if the related interrupt is disabled or the interrupt is enabled but the stack is full, the program will resume execution at the next instruc- tion. the other is if the interrupt is enabled and the stack is not full, the regular interrupt response takes place. it is necessary to mention that if an interrupt request flag is set to  1  before entering the sleep mode or idle mode, the wake-up function of the related interrupt will be dis- abled. once a sleep mode or idle mode wake-up event occurs, it will take sst delay time (1024 system clock period) to resume to green mode. in other words, a dummy period is inserted after a wake-up. if the wake-up results from an interrupt acknowledge signal, the actual interrupt subroutine execution will be delayed by one or more cy - cles. if the wake-up results in the next instruction execu - tion, this will be executed immediately after the dummy period is finished. to minimize power consumption, all the i/o pins should be carefully managed before entering the sleep mode or idle mode. the sleep mode or idle mode is initialized by the halt instruction and results in the following.  the system clock will be turned off.  the wdt function will be disabled if the wdt clock source is the instruction clock.  the wdt function will be disabled if the wdt clock source is the 32768hz in idle mode.  the wdt will still function if the wdt clock source is the wdt osc.  if the wdt function is still enabled, the wdt counter and wdt prescaler will be cleared and recounted again.  the contents of the on chip ram and registers remain unchanged.  all the i/o ports maintain their original status.  the flag pdf is set and the flag to is cleared by hard - ware. reset there are three ways in which a reset can occur.  power on reset.  a low pulse onto res pin.  wdt time-out. after these reset conditions, the program counter and stack pointer will be cleared to 0. to guarantee that the system oscillator is started and stabilized, the sst (system start-up timer) provides an extra-delay of 1024 system clock pulses when the sys - tem is reset or awakes from the sleep or idle operation mode. 9    6     1   7   4 reset circuit / '      /   
0  '      -  !   d   !       ? b   '     0  
    /   '    ?
  6 >    0 ' ' '  6      '      reset configuration      6  9      '    ?
   "   ' '      reset timing chart
ht95axxx rev. 1.20 16 may 26, 2004 by examining the processor status flags pdf and to, the software program can distinguish between the dif - ferent  chip resets  . to pdf reset condition 0 0 power on reset uu external reset during normal mode or green mode 01 external reset during sleep mode or idle mode 1u wdt time-out during normal mode or green mode 11 wdt time-out during sleep mode or idle mode note:  u  means  unchanged  the functional units chip reset status are shown below: program counter 000h interrupt disabled prescaler cleared wdt cleared after a master reset, wdt begins counting. (if wdt function is enabled by mask option) timer/event counter 0/1 off input/output port input mode stack pointer points to the top of the stack when the reset conditions occurred, some registers may be changed or unchanged. (ht95a400/40p) register addr. reset conditions power on res pin res pin (sleep/idle) wdt wdt (sleep/idle) iar0 00h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu mp0 01h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu iar1 02h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu mp1 03h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu bp 04h --00 0000 --00 0000 --00 0000 --00 0000 --uu uuuu acc 05h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu pcl 06h 0000h 0000h 0000h 0000h 0000h tblp 07h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu tblh 08h xxxx xxxx uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu wdts 09h 0000 0111 0000 0111 0000 0111 0000 0111 uuuu uuuu status 0ah --00 xxxx --uu uuuu --01 uuuu --1u uuuu --11 uuuu intc0 0bh -000 0000 -000 0000 -000 0000 -000 0000 -uuu uuuu tmr0h 0ch xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx uuuu uuuu tmr0l 0dh xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx uuuu uuuu tmr0c 0eh 00-0 1--- 00-0 1--- 00-0 1--- 00-0 1--- uu-u u--- tmr1h 0fh xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx uuuu uuuu tmr1l 10h xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx uuuu uuuu tmr1c 11h 00-0 1--- 00-0 1--- 00-0 1--- 00-0 1--- uu-u u--- pa 12h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pac 13h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pb 14h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pbc 15h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu dialerio 16h 111x xxxx 111x xxxx 111x xxxx 111x xxxx uuuu uuuu pd 18h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pdc 19h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pe 1ah 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pec 1bh 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu intc1 1eh -000 -000 -000 -000 -000 -000 -000 -000 -uuu -uuu tbhp 1fh --xx xxxx --uu uuuu --uu uuuu --uu uuuu --uu uuuu
ht95axxx rev. 1.20 17 may 26, 2004 register addr. reset conditions power on res pin res pin (sleep/idle) wdt wdt (sleep/idle) dtmfc 20h ---- -0-1 ---- -0-1 ---- -0-1 ---- -0-1 ---- -u-u dtmfd 21h 0000 0000 0000 0000 0000 0000 0000 0000 uuuu uuuu line 22h 0--- ---- u--- ---- u--- ---- u--- ---- u--- ---- rtcc 24h 0-0- ---- u-u- ---- u-u- ---- u-u- ---- u-u- ---- mode 26h 000- ---- 00u- ---- 00u- ---- 00u- ---- 000- ---- pfdc 2eh 0000 ---- 0000 ---- 0000 ---- 0000 ---- uuuu ---- pfdd 2fh 0000 0000 0000 0000 0000 0000 0000 0000 uuuu uuuu pf 34h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pfc 35h 1111 1111 1111 1111 1111 1111 1111 1111 uuuu uuuu pg 36h ---- 1111 ---- 1111 ---- 1111 ---- 1111 ---- uuuu pgc 37h ---- 1111 ---- 1111 ---- 1111 ---- 1111 ---- uuuu ram (data & lcd) x u u u u note:  u  means  unchanged   x  means  unknown   -  means  unused  timer/event counter two timer/event counters (tmr0, tmr1) are imple - mented in the telephone controller series. the timer/event counter 0 and timer/event counter 1 con- tain 16-bits programmable count-up counter and the clock may come from an external or internal source. for tmr0, the internal source is the instruction clock (sys- tem clock/4). for tmr1, the internal source is 32768hz. using the 32768hz clock or instruction clock, there is only one reference time-base. the external clock input allows the user to count external events, measure time intervals or pulse width, or generate an accurate time base. there are 3 registers related to the timer/event counter 0; tmr0h, tmr0l and tmr0c. writing tmr0l only writes the data into a low byte buffer, but writing tmr0h simultaneously writes the data along with the contents of the low byte buffer into the timer/event counter 0 preload register (16-bit). the timer/event counter 0 preload register is changed by writing tmr0h opera - tions. writing tmr0l will keep the timer/event counter 0 preload register unchanged. reading tmr0h latches the tmr0l into the low byte buffer to avoid a false timing problem. reading tmr0l returns the contents of the low byte buffer. in other words, the low byte of the timer/event counter 0 can not be read directly. it must read the tmr0h first to make the low byte contents of timer/event counter 0 be latched into the buffer. there are 3 registers related to the timer/event counter 1; tmr1h, tmr1l and tmr1c. the timer/event counter 1 operates in the same manner as the timer/event counter 0. the tmr0c is the timer/event counter 0 control regis - ter, which defines the timer/event counter 0 options. the timer/event counter 1 has the same options as the timer/event counter 0 and is defined by tmr1c. the timer/event counter control registers define the operat - ing mode, counting enable or disable and active edge.     2         2               6 2   6     2         2         2       0   ' /    "         
  ' 
 
0    2 6 a    ' 
    '  2    0
 '          2  a    
    '  2    ' :     0
  a  # 0
& 
'           '  c '        
 '  0
 1 ' <     '  0
 1 2 3 =    '  c ' ) % * + , - . !
& ' :   ' :  # #  ; 
  c ' ; '     '    '   ' 
 '    
   ' #
' ' ' ' ' ' ' ' ' ' -  $ 8     2    7 timer/event counter 0/1
ht95axxx rev. 1.20 18 may 26, 2004 the t0m0/t1m0, t0m1/t1m1 bits define the operating mode. the event count mode is used to count external events, which means the clock source comes from an external (tmr0 or tmr1) pin. the timer mode functions as a normal timer with the clock source coming from the instruction clock (tmr0) or 32768hz (tmr1). the pulse width measurement mode can be used to count the high or low level duration of the external signal (tmr0 or tmr1). the counting is based on the 32768hz clock for tmr1 or instruction clock for tmr0. in the event count or timer mode, once the timer/event counter starts counting, it will count from the current contents in the timer/event counter to ffffh. if an over - flow occurs, the counter is reloaded from the timer/event counter preload register and generates the correspond - ing interrupt request flag (t0f/t1f) at the same time. note that the event count mode is not available for timer1 of ht95a100/10p. in pulse width measurement mode with the t0on/ t1on and t0e/t1e bits equal to 1, once the tmr0/tmr1 pin has received a transient from low to high (or high to low; if the t0e/t1e bit is 0) it will start counting until the tmr0/tmr1 pin returns to the original level and resets the t0on/t1on. the measured result will remain in the timer/event counter even if the acti - vated transient occurs again. in other words, only 1 cy- cle measurement can be done. until setting the t0on/t1on, the cycle measurement will function again as long as it receives further transient pulse. note that, in this operating mode, the timer/event counter starts counting not according to the logic level but according to the transient edges. in the case of counter overflows, the counter is reloaded from the timer/event counter preload register and continue to measure the width and issues the interrupt request just like the other two modes. note that this mode is not available for timer1 of ht95a100/10p. to enable the counting operation, the timer on bit (t0on/t1on) should be set to 1. in the pulse width measurement mode, the t0on/t1on will be cleared automatically after the measurement cycle is com - pleted. but in the other two modes the t0on/t1on can only be reset by instruction. the overflow of the timer/event counter is one of the wake-up sources. no matter what the operation mode is, writin ga0to et0i/et1i can disable the corresponding interrupt ser - vice. in the case of timer/event counter off condition, writing data to the timer/event counter preload register also re - loads that data to the timer/event counter. but if the timer/event counter is turned on, data written to the timer/event counter is reserved only in the timer/event counter preload register. the timer/event counter will go on operating until an overflow occurs. input/output ports there is a maximum of 44 bidirectional input/output lines in the ht95axxx family mcu, labeled as pa, pb, pd, pe, pf and pg. all of these i/o ports can be used for input and output operations. for input operation, these ports are non-latching, that is, the inputs must be ready at the t2 rising edge of instruction  mov a,[m]  (m=12h, 14h, 18h, 1ah, 34h or 36h). for output oper- ation, all the data is latched and remains unchanged un- til the output latch is rewritten. regis - ter label bits r/w function tmr0c (0eh) / tmr1c (11h)  0~2 ro unused bit, read as  0  t0e/t1e 3 rw to define the tmr0/tmr1 active edge of timer for event count or timer mode (0=active on low to high; 1=active on high to low) for pulse width measurement mode (0=measures low pulse width; 1=measures high pulse width) t0on/t1on 4 rw to enable/disable timer counting (0=disabled; 1=enabled)  5ro unused bit, read as  0  t0m0/t1m0 t0m1/t1m1 6 7 rw to define the operating mode bit 7, 6=01, event count mode (external clock) bit 7, 6=10, timer mode bit 7, 6=11, pulse width measurement mode bit 7, 6=00, unused register bits r/w function tmr0h (0ch) 0~7 rw timer/event counter 0 higher-order byte register tmr0l (0dh) 0~7 rw timer/event counter 0 lower-order byte register tmr1h (0fh) 0~7 rw timer/event counter 1 higher-order byte register tmr1l (10h) 0~7 rw timer/event counter 1 lower-order byte register
ht95axxx rev. 1.20 19 may 26, 2004 each i/o line has its own control register (pac, pbc, pdc, pec, pfc, pgc) to control the input/output con - figuration. with this control register, cmos output or schmitt trigger input can be reconfigured dynamically under software control. to make one i/o line to function as an input line, the corresponding latch of the control register must be written with a  1  . the pull-high resis - tance shows itself automatically if the pull-high option is selected. the input source also depends on the control register. if the control register bit is  1  , the input will read the pad state. if the control register bit is  0  , the contents of the latches will move to the internal bus. the latter is possible in the  read-modify-write  instruction. for output function, cmos is the only configuration. each bit of these input/output latches can be set or cleared by  set [m].i  and  clr [m].i  (m=12h, 14h, 18h, 1ah, 34h or 36h) instructions. some instructions first input data and then follow the output operations. for example,  set [m].i  ,  clr [m].i  ,  cpl [m]  ,  cpla [m]  read the entire port states into the cpu, execute the defined operations (bit-operation), and then write the results back to the latches or the accumulator. each line of port a has the capability of waking-up the device. they are selected by mask option per bit. there is a pull-high option available for all i/o lines. once the pull-high option of an i/o line is selected, the i/o lines have pull-high resistor. otherwise, the pull-high resistor is absent. it should be noted that a non-pull-high i/o line operating in input mode may cause a floating state. i/o port pull-high, wake-up function are selected by mask option i/o port output input supported for ht95axxx pull-high resistor wake-up function 400/p 300/p 200/p 100/p pa7~pa0 cmos selected per bit selected per bit  pb7~pb0 cmos selected per bit   pd3~pd0 cmos selected per nibble   pd7~pd4 cmos selected per nibble   pe3~pe0 cmos selected per nibble   pe7~pe4 cmos selected per nibble    pf7~pf0 cmos selected per nibble    pg3~pg0 cmos selected per nibble    note:  means unavailable           
              
                        !   "       !  #
  $  % & ' % (   % & ' % (  &   $    (
       (   $
   &   $    !  #
  $ & )
  !    !   "  &   $    !  #
  $  $
        !  #
  $      (
 input/output ports
ht95axxx rev. 1.20 20 may 26, 2004 dtmf generator the dtmf (dual tone multiple-frequency) signal generator is implemented in the telephone controller. it can generate 16 dual tones and 8 single tones from the dtmf pin. this generator also supports power down, tone on/off function. the dtmf generator clock source is 3.58mhz, before using this function, the system operation mode must be at nor - mal mode. the power down mode (d_pwdn=1) will terminate all the dtmf generator function, however, the registers dtmfc and dtmfd are accessible at this power down mode. the duration of dtmf output should be handled by the software. dtmfd register value could be changed as desired, the dtmf pin will output the new dual-tone simultaneously. register label bits r/w function dtmfc (20h) d_pwdn 0 rw dtmf generator power down 1: dtmf generator is at power down mode. 0: dtmf generator is at operation mode.  1ro unused bit, read as  0  tone 2 rw tone output enable 1: dtmf signal output is enabled. 0: dtmf signal output is disabled.  3 rw reserved, inhibit using  4 rw reserved, inhibit using  5ro unused bit, read as  0   6 rw reserved, inhibit using  7ro unused bit, read as  0  dtmfd (21h) tc4~tc1 3~0 rw to set high group frequency tr4~tr1 7~4 rw to set low group frequency note: bit 3,4,6 of dtmfc are reserved, always keep the initial value. the dtmf pin output is controlled by the combination of the d_pwdn, tone, tr~tc value. control register bits dtmf pin output status d_pwdn tone tr4~tr1/tc4~tc1 1x x 0 0 0 x 1/2 vdd 0 1 0 1/2 vdd 0 1 any valid value 16 dual tones or 8 signal tones, bias with 1/2 vdd tone frequency output frequency (hz) % error specified actual 697 699 +0.29% 770 766  0.52% 852 847  0.59% 941 948 +0.74% 1209 1215 +0.50% 1336 1332  0.30% 1477 1472  0.34% % error does not contain the crystal frequency shift *  +     ,  - . / *      )   

#   0   )   ,  - . / *   "  ,  - . /    $   "    $ 
 "  1    0  2  $  ,  - . /  ,  - . / * ,  - . /  ,  - . / * ,  - . /   3   - /   3   - / * dtmf output
ht95axxx rev. 1.20 21 may 26, 2004 dtmf frequency selection table: register dtmfd[21h] low group high group dtmf output dtmf code tr4 tr3 tr2 tr1 tc4 tc3 tc2 tc1 low high 00010001697 1209 1 00010010697 1336 2 00010100697 1477 3 00011000697 1633 a 00100001770 1209 4 00100010770 1336 5 00100100770 1477 6 00101000770 1633 b 01000001852 1209 7 01000010852 1336 8 01000100852 1477 9 01001000852 1633 c 10000001941 1209 * 10000010941 1336 0 10000100941 1477 # 10001000941 1633 d single tone for testing only 00010000697 00100000770 01000000852 10000000941 00000001 1209 00000010 1336 00000100 1477 00001000 1633 writing other values to tr4~tr1, tc4~tc1 may generate an unpredictable tone.
ht95axxx rev. 1.20 22 may 26, 2004 dialer i/o function a special dialer i/o circuit is built into the telephone controller for dialing application. these specially designed i/o cells allows the controller to work under a low voltage condition that usually happens when the subscriber  s loop is long. dialer i/o pin function: name i/o description xmute nmos output xmute pin output is controlled by software. this is an nmos open drain structure pulled to vss during dialing signal transmission. otherwise, it is an open circuit. xmute is used to mute the speech circuit when transmitting the dialer signal. dnpo nmos output dnpo pin is an nmos output, usually by means of software to make/break the line. this pin is only controlled by software. po cmos output this pin is controlled by the hks , hfi and hdi pins. when po pin is high, the telephone line is make. when po pin is low, the telephone line is break. hks schmitt trigger input this pin controls the po pin directly. this pin is used to monitor the status of the hook-switch and its combination with hfi/hdi can control the po pin output to make or break the line. a rising edge to hks pin will cause the dialer i/o to be on-hook status and generate an interrupt, its vector is 18h. a falling edge to hks pin will cause the dialer i/o to be off-hook status and clear hfo and hdo flags to 0. this falling edge will also generate an interrupt, its vector is 18h. hdo cmos output supported for ht95a400/40p, ht95a300/30p, ht95a200/20p this pin is controlled directly by hdi , hks and hfi pin. when hdo pin is high, the hold-line function is enabled and po outputs a high signal to make the line. hdi schmitt trigger input supported for ht95a400/40p, ht95a300/30p, ht95a200/20p a low pulse to hdi pin (hold-line function request) will clear hfo to 0 and toggle hdo and generates an interrupt, its vector is 18h. this pin controls the hfo and hdo pins directly. this pin is functional only when the line is made, that is, off-hook or hand-free (po output high signal). hfo cmos output this pin is controlled directly by hfi, hdi and hks pins. when hfo pin is high, the hand-free function is enabled and po outputs a high signal to make the line. hfi schmitt trigger input a high pulse to hfi pin (hand-free function request) will clear hdo to 0 and toggle hfo and generates an interrupt, its vector is 18h. this pin controls the po , hfo and hdo pins directly. the following are the recommended circuit for hfi and hdi pins.     4 *  5 6 5  
*        4 *  5 6   
*       $        )
# )  +        $          2  +    
ht95axxx rev. 1.20 23 may 26, 2004 phone controller also supports the dialer i/o flag to monitor the dialer status. register label bits r/w function dialerio (16h) hfi 0 ro 1: the hfi pin level is 1. 0: the hfi pin level is 0. hfo 1 ro 1: the hfo pin level is 1. 0: the hfo pin level is 0. hdi 2ro supported for ht95a400/40p, ht95a300/30p, ht95a200/20p 1: the hdi pin level is 1. 0: the hdi pin level is 0. hdo 3 ro supported for ht95a400/40p, ht95a300/30p, ht95a200/20p 1: the hdo pin level is 1. 0: the hdo pin level is 0. hks 4ro 1: the hks pin level is 1. 0: the hks pin level is 0. spo 5 rw 1: the po pin is controlled by the combination of the hks , hfi and hdi pin. 0: the po pin level is set to 0 by software. sdnpo 6 rw 1: the dnpo pin level is set to floating by software. 0: the dnpo pin level is set to 0 by software. xmute 7rw 1: the xmute pin is set to floating by software. 0: the xmute pin is set to 0 by software. the spo flag is special designed to control the po . when the flag spo is set to 1, the po pin is controlled by the combi - nation of the hks pin, hfi pin and hdi pin. the po pin will always be 0 if the flag spo=0. the relation between the dialer i/o function (spo=1) dialer function dialer i/o pin (flag) status result hks hfo hdo po dnpo telephone line on-hook 1 0 0 0 floating break on-hook & hand-free 1 1 0 1 floating make on-hook & hold-line 1 0 1 1 floating make off-hook 0 0 0 1 floating make off-hook & hand-free 0 1 0 1 floating make off-hook & hold-line 0 0 1 1 floating make the following describes the dialer i/o function status machine figure (available on normal mode, green mode or sleep mode):   )     0 0  )      )    6 5  6 5  6   6 5  6    0 0  )      )    6   6 5   0 0  )    6    0 0  )    6  "  0 $     )    6  "  0 $    0 0  )    6   "  
   )    6   "  
   )     0 0  )    6   note: 1. if the dialer status is on-hook and hold-line, the falling edge transition onto hdi pin will not generate the dialer i/o interrupt. 2. dialer i/o function is not available in idle mode. off-hook: a falling edge to hks pin on-hook: a rising edge to hks pin hfi: a high pulse to hfi pin (hand-free request is generated.) hdi: a low pulse to hdi pin (hold-line request is generated.)
ht95axxx rev. 1.20 24 may 26, 2004 line control function (supported for ht95a400/40p, ht95a300/30p, ht95a200/20p) register label bits r/w function line (22h)  6~0 ro unused bit, read as  0  linec 7 rw 1: enable the line control function 0: disable the line control function the line control function is enabled by the flag linec conditions source to enable line control function linec operation mode 1 normal or green mode rtc time out interrupt 1 sleep mode port a wake-up rtc time out interrupt 1 idle mode port a wake-up when the line control source is activated, the po pin will be set to high signal. clearing linec to 0 will terminate the line control function and drive po pin outputs low signal. rtc function register label bits r/w function rtcc (24h)  6, 4~0 ro unused bit, read as  0  rtcen 5 rw 1: enable rtc function 0: disable rtc function rtcto 7 rw 1: rtc time-out occurs 0: rtc time-out not occurs the real time clock (rtc) is used to supply a regular internal interrupt. its time-out period is 1000ms. if the rtc time-out occurs, the interrupt request flag rtcf and the rtcto flag will be set to 1. the interrupt vector for the rtc is 14h. when the interrupt subroutine is serviced, the interrupt request flag (rtcf) will be cleared to 0, but the flag rtcto remain in its original value. if the rtcto flag is not cleared, next rtc time-out interrupt will occur. pfd generator (supported for ht95a400/40p, ht95a300/30p, ht95a200/20p) register label bits r/w function pfdc (2eh)  3~0 ro unused bit, read as  0  pfden 4 rw 1: enable pfd output 0: disable pfd output, the music pin output low level. pres0 pres1 5 6 rw bit6, 5=00: prescaler output= pfd frequency source/1 bit6, 5=01: prescaler output= pfd frequency source/2 bit6, 5=10: prescaler output= pfd frequency source/4 bit6, 5=11: prescaler output= pfd frequency source/8 fpfd 7 rw 1: the pfd frequency source is 3.58mhz/4 0: the pfd frequency source is 32768hz pfdd (2fh)  7~0 rw pfd data register 7
  &   $   &
$ 8 
 ! , &     $ $     $             5  8 
 7  - . & / *   / *
ht95axxx rev. 1.20 25 may 26, 2004 the pfd (programmable frequency divider) is implemented in the phone controller. it is composed of two portions: a prescaler and a general counter. the prescaler is controlled by the register bits, pres0 and pres1. the general counter is programmed by an 8-bit register pfdd. the source for this generator can be selected from 3.58mhz/4 or 32768hz. to enable the pfd output, write 1 to the pfden bit. the pfdd is inhibited to write while the pfd is disabled. to modify the pfdd contents, the pfd must be enabled. when the generator is disabled, the pfdd is cleared by hardware. pfd output frequency= prescaler output 2x(n + 1) , where n=the value of the pfdd mask option table the following shows many kinds of mask options in the telephone controller. all these options should be defined in or - der to ensure proper system functions. name mask option wdt wdt source selection rc  select the wdt osc to be the wdt source. t1  select the instruction clock to be the wdt source. 32khz  select the external 32768hz to be the wdt source. disable  disable wdt function. clrwdt this option defines how to clear the wdt by instruction. one clear instruction  the  clr wdt  can clear the wdt. two clear instructions  only when both of the  clr wdt1  and  clr wdt2  have been executed, then wdt can be cleared. wake-up pa port a wake-up selection. define the activity of wake-up function. all port a have the capability to wake-up the chip from a halt. this wake-up function is selected per bit. pull-high pa pull-high pb pull-high pd pull-high pe pull-high pf pull-high pg pull-high option. this option determines whether the pull-high resistance is viable or not. port a pull-high option is selected per bit. port b pull-high option is selected per bit. port d pull-high option is selected per nibble. port e pull-high option is selected per nibble. port f pull-high option is selected per nibble. port g pull-high option is selected per nibble. $  8    $ $  8    $       5   ! .  * 9  ! .   : +  ; < 6 = : 4 > < 6 =  ? 5  . - 5           & &    $ 5  . -
application circuits note: some floating input pins (int , tmr1, tmr0, etc.) are not shown in this circuit. ht95axxx rev. 1.20 26 may 26, 2004 + > <  : ; @ a * ?  b  ,  *  +  & : 5 >  5 * >   : +  ; < 6 =    '      $
c            *      4 *  5 ! .    , .  , 5     8 ) -   2  $     *     +     > 4 *  *    5  4 *  5  4 *  5 6  " 0 $   * 4 >    0 0  )      )    *     !
# ,
 + +  *      @ + : 4 :    ? +  4  +  5 6 5   6      6 '  6 5  *     *   5 + +    : :   : :    * - ? * ? < *  5 + 4 +   + +    * - ? * ? < * - ? * ? < * - ? * ? < ?    *  5 * >       &           4 *  5 (     $  * 4 >  : / ? 4 >  '   * '   + '   : '   ? '   > '   ; '    '   < '   @ '   *  '   * * '   * + *    6   + +   
instruction set summary mnemonic description instruction cycle flag affected arithmetic add a,[m] addm a,[m] add a,x adc a,[m] adcm a,[m] sub a,x sub a,[m] subm a,[m] sbc a,[m] sbcm a,[m] daa [m] add data memory to acc add acc to data memory add immediate data to acc add data memory to acc with carry add acc to data memory with carry subtract immediate data from acc subtract data memory from acc subtract data memory from acc with result in data memory subtract data memory from acc with carry subtract data memory from acc with carry and result in data memory decimal adjust acc for addition with result in data memory 1 1 (1) 1 1 1 (1) 1 1 1 (1) 1 1 (1) 1 (1) z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov z,c,ac,ov c logic operation and a,[m] or a,[m] xor a,[m] andm a,[m] orm a,[m] xorm a,[m] and a,x or a,x xor a,x cpl [m] cpla [m] and data memory to acc or data memory to acc exclusive-or data memory to acc and acc to data memory or acc to data memory exclusive-or acc to data memory and immediate data to acc or immediate data to acc exclusive-or immediate data to acc complement data memory complement data memory with result in acc 1 1 1 1 (1) 1 (1) 1 (1) 1 1 1 1 (1) 1 z z z z z z z z z z z increment & decrement inca [m] inc [m] deca [m] dec [m] increment data memory with result in acc increment data memory decrement data memory with result in acc decrement data memory 1 1 (1) 1 1 (1) z z z z rotate rra [m] rr [m] rrca [m] rrc [m] rla [m] rl [m] rlca [m] rlc [m] rotate data memory right with result in acc rotate data memory right rotate data memory right through carry with result in acc rotate data memory right through carry rotate data memory left with result in acc rotate data memory left rotate data memory left through carry with result in acc rotate data memory left through carry 1 1 (1) 1 1 (1) 1 1 (1) 1 1 (1) none none c c none none c c data move mov a,[m] mov [m],a mov a,x move data memory to acc move acc to data memory move immediate data to acc 1 1 (1) 1 none none none bit operation clr [m].i set [m].i clear bit of data memory set bit of data memory 1 (1) 1 (1) none none ht95axxx rev. 1.20 27 may 26, 2004
mnemonic description instruction cycle flag affected branch jmp addr sz [m] sza [m] sz [m].i snz [m].i siz [m] sdz [m] siza [m] sdza [m] call addr ret ret a,x reti jump unconditionally skip if data memory is zero skip if data memory is zero with data movement to acc skip if bit i of data memory is zero skip if bit i of data memory is not zero skip if increment data memory is zero skip if decrement data memory is zero skip if increment data memory is zero with result in acc skip if decrement data memory is zero with result in acc subroutine call return from subroutine return from subroutine and load immediate data to acc return from interrupt 2 1 (2) 1 (2) 1 (2) 1 (2) 1 (3) 1 (3) 1 (2) 1 (2) 2 2 2 2 none none none none none none none none none none none none none table read tabrdc [m] tabrdl [m] read rom code (current page) to data memory and tblh read rom code (last page) to data memory and tblh 2 (1) 2 (1) none none miscellaneous nop clr [m] set [m] clr wdt clr wdt1 clr wdt2 swap [m] swapa [m] halt no operation clear data memory set data memory clear watchdog timer pre-clear watchdog timer pre-clear watchdog timer swap nibbles of data memory swap nibbles of data memory with result in acc enter power down mode 1 1 (1) 1 (1) 1 1 1 1 (1) 1 1 none none none to,pdf to (4) ,pdf (4) to (4) ,pdf (4) none none to,pdf note: x: immediate data m: data memory address a: accumulator i: 0~7 number of bits addr: program memory address  : flag is affected  : flag is not affected (1) : if a loading to the pcl register occurs, the execution cycle of instructions will be delayed for one more cycle (four system clocks). (2) : if a skipping to the next instruction occurs, the execution cycle of instructions will be delayed for one more cycle (four system clocks). otherwise the original instruction cycle is unchanged. (3) : (1) and (2) (4) : the flags may be affected by the execution status. if the watchdog timer is cleared by executing the  clr wdt1  or  clr wdt2  instruction, the to and pdf are cleared. otherwise the to and pdf flags remain unchanged. ht95axxx rev. 1.20 28 may 26, 2004
instruction definition adc a,[m] add data memory and carry to the accumulator description the contents of the specified data memory, accumulator and the carry flag are added si - multaneously, leaving the result in the accumulator. operation acc acc+[m]+c affected flag(s) to pdf ov z ac c  adcm a,[m] add the accumulator and carry to data memory description the contents of the specified data memory, accumulator and the carry flag are added si - multaneously, leaving the result in the specified data memory. operation [m] acc+[m]+c affected flag(s) to pdf ov z ac c  add a,[m] add data memory to the accumulator description the contents of the specified data memory and the accumulator are added. the result is stored in the accumulator. operation acc acc+[m] affected flag(s) to pdf ov z ac c  add a,x add immediate data to the accumulator description the contents of the accumulator and the specified data are added, leaving the result in the accumulator. operation acc acc+x affected flag(s) to pdf ov z ac c  addm a,[m] add the accumulator to the data memory description the contents of the specified data memory and the accumulator are added. the result is stored in the data memory. operation [m] acc+[m] affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 29 may 26, 2004
and a,[m] logical and accumulator with data memory description data in the accumulator and the specified data memory perform a bitwise logical_and op - eration. the result is stored in the accumulator. operation acc acc  and  [m] affected flag(s) to pdf ov z ac c    and a,x logical and immediate data to the accumulator description data in the accumulator and the specified data perform a bitwise logical_and operation. the result is stored in the accumulator. operation acc acc  and  x affected flag(s) to pdf ov z ac c    andm a,[m] logical and data memory with the accumulator description data in the specified data memory and the accumulator perform a bitwise logical_and op - eration. the result is stored in the data memory. operation [m] acc  and  [m] affected flag(s) to pdf ov z ac c    call addr subroutine call description the instruction unconditionally calls a subroutine located at the indicated address. the program counter increments once to obtain the address of the next instruction, and pushes this onto the stack. the indicated address is then loaded. program execution continues with the instruction at this address. operation stack pc+1 pc addr affected flag(s) to pdf ov z ac c  clr [m] clear data memory description the contents of the specified data memory are cleared to 0. operation [m] 00h affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 30 may 26, 2004
clr [m].i clear bit of data memory description the bit i of the specified data memory is cleared to 0. operation [m].i 0 affected flag(s) to pdf ov z ac c  clr wdt clear watchdog timer description the wdt is cleared (clears the wdt). the power down bit (pdf) and time-out bit (to) are cleared. operation wdt 00h pdf and to 0 affected flag(s) to pdf ov z ac c 00  clr wdt1 preclear watchdog timer description together with clr wdt2, clears the wdt. pdf and to are also cleared. only execution of this instruction without the other preclear instruction just sets the indicated flag which im - plies this instruction has been executed and the to and pdf flags remain unchanged. operation wdt 00h* pdf and to 0* affected flag(s) to pdf ov z ac c 0* 0*  clr wdt2 preclear watchdog timer description together with clr wdt1, clears the wdt. pdf and to are also cleared. only execution of this instruction without the other preclear instruction, sets the indicated flag which im- plies this instruction has been executed and the to and pdf flags remain unchanged. operation wdt 00h* pdf and to 0* affected flag(s) to pdf ov z ac c 0* 0*  cpl [m] complement data memory description each bit of the specified data memory is logically complemented (1 s complement). bits which previously containe d a 1 are changed to 0 and vice-versa. operation [m] [m ] affected flag(s) to pdf ov z ac c    ht95axxx rev. 1.20 31 may 26, 2004
cpla [m] complement data memory and place result in the accumulator description each bit of the specified data memory is logically complemented (1 s complement). bits which previously contained a 1 are changed to 0 and vice-versa. the complemented result is stored in the accumulator and the contents of the data memory remain unchanged. operation acc [m ] affected flag(s) to pdf ov z ac c    daa [m] decimal-adjust accumulator for addition description the accumulator value is adjusted to the bcd (binary coded decimal) code. the accumu - lator is divided into two nibbles. each nibble is adjusted to the bcd code and an internal carry (ac1) will be done if the low nibble of the accumulator is greater than 9. the bcd ad - justment is done by adding 6 to the original value if the original value is greater than 9 or a carry (ac or c) is set; otherwise the original value remains unchanged. the result is stored in the data memory and only the carry flag (c) may be affected. operation if acc.3~acc.0 >9 or ac=1 then [m].3~[m].0 (acc.3~acc.0)+6, ac1=ac else [m].3~[m].0 (acc.3~acc.0), ac1=0 and if acc.7~acc.4+ac1 >9 or c=1 then [m].7~[m].4 acc.7~acc.4+6+ac1,c=1 else [m].7~[m].4 acc.7~acc.4+ac1,c=c affected flag(s) to pdf ov z ac c   dec [m] decrement data memory description data in the specified data memory is decremented by 1. operation [m] [m]  1 affected flag(s) to pdf ov z ac c    deca [m] decrement data memory and place result in the accumulator description data in the specified data memory is decremented by 1, leaving the result in the accumula - tor. the contents of the data memory remain unchanged. operation acc [m]  1 affected flag(s) to pdf ov z ac c    ht95axxx rev. 1.20 32 may 26, 2004
halt enter power down mode description this instruction stops program execution and turns off the system clock. the contents of the ram and registers are retained. the wdt and prescaler are cleared. the power down bit (pdf) is set and the wdt time-out bit (to) is cleared. operation pc pc+1 pdf 1 to 0 affected flag(s) to pdf ov z ac c 01  inc [m] increment data memory description data in the specified data memory is incremented by 1 operation [m] [m]+1 affected flag(s) to pdf ov z ac c    inca [m] increment data memory and place result in the accumulator description data in the specified data memory is incremented by 1, leaving the result in the accumula - tor. the contents of the data memory remain unchanged. operation acc [m]+1 affected flag(s) to pdf ov z ac c    jmp addr directly jump description the program counter are replaced with the directly-specified address unconditionally, and control is passed to this destination. operation pc addr affected flag(s) to pdf ov z ac c  mov a,[m] move data memory to the accumulator description the contents of the specified data memory are copied to the accumulator. operation acc [m] affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 33 may 26, 2004
mov a,x move immediate data to the accumulator description the 8-bit data specified by the code is loaded into the accumulator. operation acc x affected flag(s) to pdf ov z ac c  mov [m],a move the accumulator to data memory description the contents of the accumulator are copied to the specified data memory (one of the data memories). operation [m] acc affected flag(s) to pdf ov z ac c  nop no operation description no operation is performed. execution continues with the next instruction. operation pc pc+1 affected flag(s) to pdf ov z ac c  or a,[m] logical or accumulator with data memory description data in the accumulator and the specified data memory (one of the data memories) per- form a bitwise logical_or operation. the result is stored in the accumulator. operation acc acc  or  [m] affected flag(s) to pdf ov z ac c    or a,x logical or immediate data to the accumulator description data in the accumulator and the specified data perform a bitwise logical_or operation. the result is stored in the accumulator. operation acc acc  or  x affected flag(s) to pdf ov z ac c    orm a,[m] logical or data memory with the accumulator description data in the data memory (one of the data memories) and the accumulator perform a bitwise logical_or operation. the result is stored in the data memory. operation [m] acc  or  [m] affected flag(s) to pdf ov z ac c    ht95axxx rev. 1.20 34 may 26, 2004
ret return from subroutine description the program counter is restored from the stack. this is a 2-cycle instruction. operation pc stack affected flag(s) to pdf ov z ac c  ret a,x return and place immediate data in the accumulator description the program counter is restored from the stack and the accumulator loaded with the speci - fied 8-bit immediate data. operation pc stack acc x affected flag(s) to pdf ov z ac c  reti return from interrupt description the program counter is restored from the stack, and interrupts are enabled by setting the emi bit. emi is the enable master (global) interrupt bit. operation pc stack emi 1 affected flag(s) to pdf ov z ac c  rl [m] rotate data memory left description the contents of the specified data memory are rotated 1 bit left with bit 7 rotated into bit 0. operation [m].(i+1) [m].i; [m].i:bit i of the data memory (i=0~6) [m].0 [m].7 affected flag(s) to pdf ov z ac c  rla [m] rotate data memory left and place result in the accumulator description data in the specified data memory is rotated 1 bit left with bit 7 rotated into bit 0, leaving the rotated result in the accumulator. the contents of the data memory remain unchanged. operation acc.(i+1) [m].i; [m].i:bit i of the data memory (i=0~6) acc.0 [m].7 affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 35 may 26, 2004
rlc [m] rotate data memory left through carry description the contents of the specified data memory and the carry flag are rotated 1 bit left. bit 7 re - places the carry bit; the original carry flag is rotated into the bit 0 position. operation [m].(i+1) [m].i; [m].i:bit i of the data memory (i=0~6) [m].0 c c [m].7 affected flag(s) to pdf ov z ac c   rlca [m] rotate left through carry and place result in the accumulator description data in the specified data memory and the carry flag are rotated 1 bit left. bit 7 replaces the carry bit and the original carry flag is rotated into bit 0 position. the rotated result is stored in the accumulator but the contents of the data memory remain unchanged. operation acc.(i+1) [m].i; [m].i:bit i of the data memory (i=0~6) acc.0 c c [m].7 affected flag(s) to pdf ov z ac c   rr [m] rotate data memory right description the contents of the specified data memory are rotated 1 bit right with bit 0 rotated to bit 7. operation [m].i [m].(i+1); [m].i:bit i of the data memory (i=0~6) [m].7 [m].0 affected flag(s) to pdf ov z ac c  rra [m] rotate right and place result in the accumulator description data in the specified data memory is rotated 1 bit right with bit 0 rotated into bit 7, leaving the rotated result in the accumulator. the contents of the data memory remain unchanged. operation acc.(i) [m].(i+1); [m].i:bit i of the data memory (i=0~6) acc.7 [m].0 affected flag(s) to pdf ov z ac c  rrc [m] rotate data memory right through carry description the contents of the specified data memory and the carry flag are together rotated 1 bit right. bit 0 replaces the carry bit; the original carry flag is rotated into the bit 7 position. operation [m].i [m].(i+1); [m].i:bit i of the data memory (i=0~6) [m].7 c c [m].0 affected flag(s) to pdf ov z ac c   ht95axxx rev. 1.20 36 may 26, 2004
rrca [m] rotate right through carry and place result in the accumulator description data of the specified data memory and the carry flag are rotated 1 bit right. bit 0 replaces the carry bit and the original carry flag is rotated into the bit 7 position. the rotated result is stored in the accumulator. the contents of the data memory remain unchanged. operation acc.i [m].(i+1); [m].i:bit i of the data memory (i=0~6) acc.7 c c [m].0 affected flag(s) to pdf ov z ac c   sbc a,[m] subtract data memory and carry from the accumulator description the contents of the specified data memory and the complement of the carry flag are sub - tracted from the accumulator, leaving the result in the accumulator. operation acc acc+[m ]+c affected flag(s) to pdf ov z ac c  sbcm a,[m] subtract data memory and carry from the accumulator description the contents of the specified data memory and the complement of the carry flag are sub - tracted from the accumulator, leaving the result in the data memory. operation [m] acc+[m ]+c affected flag(s) to pdf ov z ac c  sdz [m] skip if decrement data memory is 0 description the contents of the specified data memory are decremented by 1. if the result is 0, the next instruction is skipped. if the result is 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruc - tion (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if ([m]  1)=0, [m] ([m]  1) affected flag(s) to pdf ov z ac c  sdza [m] decrement data memory and place result in acc, skip if 0 description the contents of the specified data memory are decremented by 1. if the result is 0, the next instruction is skipped. the result is stored in the accumulator but the data memory remains unchanged. if the result is 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cy - cles). otherwise proceed with the next instruction (1 cycle). operation skip if ([m]  1)=0, acc ([m]  1) affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 37 may 26, 2004
set [m] set data memory description each bit of the specified data memory is set to 1. operation [m] ffh affected flag(s) to pdf ov z ac c  set [m]. i set bit of data memory description bit i of the specified data memory is set to 1. operation [m].i 1 affected flag(s) to pdf ov z ac c  siz [m] skip if increment data memory is 0 description the contents of the specified data memory are incremented by 1. if the result is 0, the fol - lowing instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if ([m]+1)=0, [m] ([m]+1) affected flag(s) to pdf ov z ac c  siza [m] increment data memory and place result in acc, skip if 0 description the contents of the specified data memory are incremented by 1. if the result is 0, the next instruction is skipped and the result is stored in the accumulator. the data memory re- mains unchanged. if the result is 0, the following instruction, fetched during the current in- struction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if ([m]+1)=0, acc ([m]+1) affected flag(s) to pdf ov z ac c  snz [m].i skip if bit i of the data memory is not 0 description if bit i of the specified data memory is not 0, the next instruction is skipped. if bit i of the data memory is not 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). other - wise proceed with the next instruction (1 cycle). operation skip if [m].i  0 affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 38 may 26, 2004
sub a,[m] subtract data memory from the accumulator description the specified data memory is subtracted from the contents of the accumulator, leaving the result in the accumulator. operation acc acc+[m ]+1 affected flag(s) to pdf ov z ac c  subm a,[m] subtract data memory from the accumulator description the specified data memory is subtracted from the contents of the accumulator, leaving the result in the data memory. operation [m] acc+[m ]+1 affected flag(s) to pdf ov z ac c  sub a,x subtract immediate data from the accumulator description the immediate data specified by the code is subtracted from the contents of the accumula - tor, leaving the result in the accumulator. operation acc acc+x +1 affected flag(s) to pdf ov z ac c  swap [m] swap nibbles within the data memory description the low-order and high-order nibbles of the specified data memory (1 of the data memo- ries) are interchanged. operation [m].3~[m].0  [m].7~[m].4 affected flag(s) to pdf ov z ac c  swapa [m] swap data memory and place result in the accumulator description the low-order and high-order nibbles of the specified data memory are interchanged, writ - ing the result to the accumulator. the contents of the data memory remain unchanged. operation acc.3~acc.0 [m].7~[m].4 acc.7~acc.4 [m].3~[m].0 affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 39 may 26, 2004
sz [m] skip if data memory is 0 description if the contents of the specified data memory are 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if [m]=0 affected flag(s) to pdf ov z ac c  sza [m] move data memory to acc, skip if 0 description the contents of the specified data memory are copied to the accumulator. if the contents is 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if [m]=0 affected flag(s) to pdf ov z ac c  sz [m].i skip if bit i of the data memory is 0 description if bit i of the specified data memory is 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper instruc - tion (2 cycles). otherwise proceed with the next instruction (1 cycle). operation skip if [m].i=0 affected flag(s) to pdf ov z ac c  tabrdc [m] move the rom code (current page) to tblh and data memory description the low byte of rom code (current page) addressed by the table pointer (tblp) is moved to the specified data memory and the high byte transferred to tblh directly. operation [m] rom code (low byte) tblh rom code (high byte) affected flag(s) to pdf ov z ac c  tabrdl [m] move the rom code (last page) to tblh and data memory description the low byte of rom code (last page) addressed by the table pointer (tblp) is moved to the data memory and the high byte transferred to tblh directly. operation [m] rom code (low byte) tblh rom code (high byte) affected flag(s) to pdf ov z ac c  ht95axxx rev. 1.20 40 may 26, 2004
xor a,[m] logical xor accumulator with data memory description data in the accumulator and the indicated data memory perform a bitwise logical exclu - sive_or operation and the result is stored in the accumulator. operation acc acc  xor  [m] affected flag(s) to pdf ov z ac c    xorm a,[m] logical xor data memory with the accumulator description data in the indicated data memory and the accumulator perform a bitwise logical exclu - sive_or operation. the result is stored in the data memory. the 0 flag is affected. operation [m] acc  xor  [m] affected flag(s) to pdf ov z ac c    xor a,x logical xor immediate data to the accumulator description data in the accumulator and the specified data perform a bitwise logical exclusive_or op - eration. the result is stored in the accumulator. the 0 flag is affected. operation acc acc  xor  x affected flag(s) to pdf ov z ac c    ht95axxx rev. 1.20 41 may 26, 2004
package information 64-pin qfp (14  20) outline dimensions symbol dimensions in mm min. nom. max. a 18.80  19.20 b 13.90  14.10 c 24.80  25.20 d 19.90  20.10 e  1  f  0.40  g 2.50  3.10 h  3.40 i  0.10  j 1.15  1.45 k 0.10  0.20  0  7 ht95axxx rev. 1.20 42 may 26, 2004 8  8 % + 3  %  ) % ) )  $  :   6 4  -  j  
48-pin ssop (300mil) outline dimensions symbol dimensions in mil min. nom. max. a 395  420 b 291  299 c8  12 c 613  637 d85  99 e  25  f4  10 g25  35 h4  12  0  8 ht95axxx rev. 1.20 43 may 26, 2004 3 ,  % 8 % 3  :   4  k  -  6
28-pin sop (300mil) outline dimensions symbol dimensions in mil min. nom. max. a 394  419 b 290  300 c14  20 c 697  713 d92  104 e  50  f4  g32  38 h4  12  0  10 ht95axxx rev. 1.20 44 may 26, 2004 % ,   8  3  :   4  k  -  6
product tape and reel specifications reel dimensions ssop 48w symbol description dimensions in mm a reel outer diameter 330  1.0 b reel inner diameter 100  0.1 c spindle hole diameter 13.0+0.5  0.2 d key slit width 2.0  0.5 t1 space between flange 32.2+0.3  0.2 t2 reel thickness 38.2  0.2 sop 28w (300mil) symbol description dimensions in mm a reel outer diameter 330  1.0 b reel inner diameter 62  1.5 c spindle hole diameter 13.0+0.5  0.2 d key slit width 2.0  0.5 t1 space between flange 24.8+0.3  0.2 t2 reel thickness 30.2  0.2 ht95axxx rev. 1.20 45 may 26, 2004   :    % 
carrier tape dimensions ssop 48w symbol description dimensions in mm w carrier tape width 32.0  0.3 p cavity pitch 16.0  0.1 e perforation position 1.75  0.1 f cavity to perforation (width direction) 14.2  0.1 d perforation diameter 2.0 min. d1 cavity hole diameter 1.5+0.25 p0 perforation pitch 4.0  0.1 p1 cavity to perforation (length direction) 2.0  0.1 a0 cavity length 12.0  0.1 b0 cavity width 16.20  0.1 k1 cavity depth 2.4  0.1 k2 cavity depth 3.2  0.1 t carrier tape thickness 0.35  0.05 c cover tape width 25.5 ht95axxx rev. 1.20 46 may 26, 2004         6 4   % :    /   
sop 28w (300mil) symbol description dimensions in mm w carrier tape width 24.0  0.3 p cavity pitch 12.0  0.1 e perforation position 1.75  0.1 f cavity to perforation (width direction) 11.5  0.1 d perforation diameter 1.5+0.1 d1 cavity hole diameter 1.5+0.25 p0 perforation pitch 4.0  0.1 p1 cavity to perforation (length direction) 2.0  0.1 a0 cavity length 10.85  0.1 b0 cavity width 18.34  0.1 k0 cavity depth 2.97  0.1 t carrier tape thickness 0.35  0.01 c cover tape width 21.3 ht95axxx rev. 1.20 47 may 26, 2004    /      6 4    :    
ht95axxx rev. 1.20 48 may 26, 2004 copyright  2004 by holtek semiconductor inc. the information appearing in this data sheet is believed to be accurate at the time of publication. however, holtek as - sumes no responsibility arising from the use of the specifications described. the applications mentioned herein are used solely for the purpose of illustration and holtek makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise. holtek s products are not authorized for use as critical components in life support devices or systems. holtek reserves the right to alter its products without prior notification. for the most up-to-date information, please visit our web site at http://www.holtek.com.tw. holtek semiconductor inc. (headquarters) no.3, creation rd. ii, science park, hsinchu, taiwan tel: 886-3-563-1999 fax: 886-3-563-1189 http://www.holtek.com.tw holtek semiconductor inc. (taipei sales office) 4f-2, no. 3-2, yuanqu st., nankang software park, taipei 115, taiwan tel: 886-2-2655-7070 fax: 886-2-2655-7373 fax: 886-2-2655-7383 (international sales hotline) holtek semiconductor inc. (shanghai sales office) 7th floor, building 2, no.889, yi shan rd., shanghai, china 200233 tel: 021-6485-5560 fax: 021-6485-0313 http://www.holtek.com.cn holtek semiconductor inc. (shenzhen sales office) 43f, seg plaza, shen nan zhong road, shenzhen, china 518031 tel: 0755-8346-5589 fax: 0755-8346-5590 isdn: 0755-8346-5591 holtek semiconductor inc. (beijing sales office) suite 1721, jinyu tower, a129 west xuan wu men street, xicheng district, beijing, china 100031 tel: 010-6641-0030, 6641-7751, 6641-7752 fax: 010-6641-0125 holmate semiconductor, inc. (north america sales office) 46712 fremont blvd., fremont, ca 94538 tel: 510-252-9880 fax: 510-252-9885 http://www.holmate.com


▲Up To Search▲   

 
Price & Availability of HT95A20020P

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X